﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IDeviceNotificationHandler.cs" company="Matthias Friedrich">
//   Copyright © Matthias Friedrich 2009
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace DeviceManagement
{
	using System.Windows.Forms;

	public interface IDeviceNotificationHandler
	{
		/// <summary>
		/// The system broadcasts the DBT_CONFIGCHANGECANCELED device event when a request to change the current configuration (dock or undock) has been canceled.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void ConfigurationChangeCanceled(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVICEARRIVAL device event when a device or piece of media has been inserted and becomes available.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceArrival(Message m);

		/// <summary>
		/// The system broadcasts the DBT_CONFIGCHANGED device event to indicate that the current configuration has changed, due to a dock or undock. An application or driver
		///     that stores data in the registry under the HKEY_CURRENT_CONFIG key should update the data.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceConfigurationChanged(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVNODES_CHANGED device event when a device has been added to or removed from the system. Applications that maintain lists of devices
		///     in the system should refresh their lists.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceNodesChanged(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVICEQUERYREMOVE device event to request permission to remove a device or piece of media. This message is the last chance for
		///     applications and drivers to prepare for this removal. However, any application can deny this request and cancel the operation.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceQueryRemove(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVICEQUERYREMOVEFAILED device event when a request to remove a device or piece of media has been canceled.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceQueryRemoveFailed(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVICEREMOVECOMPLETE device event when a device or piece of media has been physically removed.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceRemoveComplete(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVICEREMOVEPENDING device event when a device or piece of media is being removed and is no longer available for use.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceRemovePending(Message m);

		/// <summary>
		/// The system broadcasts the DBT_DEVICETYPESPECIFIC device event when a device-specific event occurs.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void DeviceSpecificEvent(Message m);

		/// <summary>
		/// The system broadcasts the DBT_QUERYCHANGECONFIG device event to request permission to change the current configuration (dock or undock). Any application can deny this
		///     request and cancel the change.
		/// </summary>
		/// <param name="m">
		/// The m.
		/// </param>
		void QueryChangeConfiguration(Message m);
	}
}